<script type="text/javascript">
function ajaxFileUpload(contract_no)
{
	$.ajaxFileUpload
	(
		{		
			url:'index.php?c=zy_sell&m=updateFile&contract_no='+contract_no,
			secureuri:false,
			fileElementId:'file_name',
			dataType: 'json',
			success: function (data)
			{
				if(data.code == 1){
					alert('上传成功');
					location=location;
				}else{
					alert('上传失败');
				}
			}
		}
	)
}
</script> 
<h2 class="title">计划执行信息</h2>
<table class="tb_term" width="100%">
<tr>
	<td class="tr_td_width01 alignright">合同编号</td>
	<td class="tr_td_width03"><input type=text name="contract_no" value='{%$contract_no%}' class="input_browse_stand txt-normal" readonly></td>
	<td  class="tr_td_width01 alignright">谈判人员</td>
	<td>
		<select name="admin_user_id"  class="select_browse  txt-normal" readonly>
		{%html_options options=$admin_info selected=$admin_user_id%}
		</select>
	</td>
</tr>
<tr>	
	<td class="alignright">谈判日期</td>
	<td>
		<input type=text class="input_date_browse txt-normal" name="talks_time" value='{%$talks_time|date_format:"%Y-%m-%d"%}' id="talks_time" readonly class="txt-normal" readonly>
	</td>
	<td class="alignright">合同总价</td>
	<td><input type=text  name="contract_prices"  value='{%$contract_prices%}' class="input_browse_num txt-normal" readonly><label class="label01">万元(RMB)</label></td>
</tr>
<tr>	
	<td class="alignright">签订日期</td>
	<td><input type=text class="input_date_browse txt-normal" name="contract_time" size=20 value='{%$contract_time|date_format:"%Y-%m-%d"%}' id="contract_time" readonly></td>
	<td class="alignright">到货日期</td>
	<td><input type=text class="input_date_browse txt-normal" name="finish_time" value='{%$finish_time|date_format:"%Y-%m-%d"%}' id="finish_time" readonly></td>
</tr>
<tr>
	<td  class="alignright">外汇总价</td>
	<td><input type=text  name="exchange_price" id="exchange_price" value='{%$exchange_price%}' class="input_browse_num txt-normal" ><label class="label01">万元</label></td>
	<td  class="alignright">外汇汇率</td>
	<td ><input type=text name="exchange_rate"  value='{%$exchange_rate%}' id="exchange_rate" class="input_browse_num txt-normal" onkeyup="change_num();"></td>
</tr>
<tr>	
	<td class="alignright">外汇币种</td>
	<td>
		<select name="currency_id"  class="select_browse txt-normal" readonly>
			{%html_options options=$price_type_arr selected=$currency_id%}
		</select>
	</td>
	<td class="alignright">供货厂商</td>
	<td>
		<select name="sell_owner" class="select_edit02 txt-normal" readonly>
			{%foreach from=$company_arr item=company%}
			<option value="{%$company%}" {%if $company == $sell_owner %}selected {%/if%}>{%$company%}</option>
			{%/foreach%}
		</select>
	</td>
</tr>
<tr>	
	<td class="alignright">合同附件</td>
	<td colspan="3">
		<div  class="wrap_accessory">
			<input type="file" name="file_path" id="file_name" size="50" class="input_upload txt-normal"  />
			<input type="button"  class="input_submit txt-normal" value="提交" onclick="ajaxFileUpload('{%$contract_no%}')"/>
			{%if $file_path%}
			<label class="brower_download"><a href='{%$upload_file_path%}{%format_c c=$smarty.get.c%}{%$file_path%}' target="_blank">下载</a></label>
			{%/if%}
		</div>
	</td>	
</tr>
<tr>
	<td class="alignright">合同备注</td>
	<td colspan="5"><textarea rows="3" class="textarea_browse txt-normal" id="contract_info" name="contract_info" readonly />{%$contract_info%}</textarea></td>
</tr>
</table>
<p class="btn_right">
	<button type="button" class="b-default" hidefocus="true" onclick="javascript:location.href='index.php?c=zy_sell'"><span><em>返回</em></span></button>
</p>

<div class="title_box">
	<div class="title_txt">合同设备明细</div>
	<div class="find_bar">
		<form name="form_find" method="get" action="">
		<label class="find_name">设备名称</label>
		<input type="text" class="input_find" maxlength="50" name="cn_name" value="{%$smarty.get.cn_name%}">
		<input type="hidden" name="investment_no" value="{%$smarty.get.investment_no%}">
		<input type="hidden" name="m" value="{%$smarty.get.m%}">
		<input type="hidden" name="c" value="{%$smarty.get.c%}">
		<input type="hidden" name="contract_no" value="{%$smarty.get.contract_no%}">
		<!--<button type="submit" class="b-default" hidefocus="true"><span><em>查询</em></span></button>-->	
		<label class="find_btn" onclick="javascript:form_find.submit();"> 查询</label>
		</form>
	</div>
</div>

<table class="tb_list" width="100%">
<tr class="title">
	<td class="list_td_zw_04">批复序号</td>
	<td class="list_td_zw_10">中文名称</td>
	<!--<td class="list_td_zw_10">英文名称</td>-->
	<td class="list_td_zw_11">批复单号</td>
	<!--<td>购置性质</td>-->
	<td>规格型号</td>
	<td class="list_td_zw_02">数量</td>
	<!--<td>造价</td>
	<td>总价</td>-->
	<td class="list_td_zw_10">所属项目</td>
	<!--<td>设备备注</td>-->
	<td class="list_opt02">操作</td>
</tr>
{%foreach item=list from=$v_mc_info%}
<tr>
	<td>{%$list.zy_plan_replay_no%}</td>
	<td class="alignleft">{%cut_str str=$list.mc_cn_name sublen=10%}</td>
	<!--<td class="alignleft">{%cut_str str=$list.mc_en_name sublen=15%}</td>-->
	<td class="alignleft" >{%$list.plan_reply_no%}</td>
	<!--<td>{%$sell_type_arr[$list.sell_type_id]%}</td>-->
	<td class="alignleft">{%cut_str str=$list.mc_type_model sublen=15%}</td>
	<td>{%$list.plan_reply_mc_number%}</td>
	<!--<td>{%$list.make_cost%}</td>
	<td>{%$list.make_cost+$list.manage_cost+$list.vat%}</td>-->
	<td class="alignleft">{%cut_str str=$project_arr[$list.project_id] sublen=10%}</td>
	<!--<td title="{%$list.mc_info%}">{%cut_str str=$list.mc_info sublen=12%}</td>-->
	<td>
		<a href='index.php?c=zy_sell&m=browse_equipment&contract_no={%$contract_no%}&sell_reply_id={%$list.sell_reply_id%}'>查看</a>&nbsp;
		{%if $list.is_p_mc == 1%}
			<a href='index.php?c=zy_mc_log&m=add&sell_reply_id={%$list.sell_reply_id%}&contract_no={%$smarty.get.contract_no%}'>子设备</a>
		{%/if%}
	</td>
</tr>
{%foreachelse%}
<tr><td colspan="15">暂无内容</td></tr>
{%/foreach%}
</table>
<div class="pagenation aligncenter">
{%$page_footer%}
</div>
